package week5;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Set;
/**
 * Created by dell on 2017/3/26.
 */
public class TestStudent {
    public static void main(String[] args) {
        LinkedList<Student2> list = new LinkedList<Student2>();
        Set<Student2> set = new HashSet<Student2>();
        Student2 stu1  = new Student2(3,"张三");
        Student2 stu2  = new Student2(3,"张三");
        System.out.println("stu1 == stu2 : "+(stu1 == stu2));
        System.out.println("stu1.equals(stu2) : "+stu1.equals(stu2));
        list.add(stu1);
        list.add(stu2);
        System.out.println("list size:"+ list.size());

        set.add(stu1);
        set.add(stu2);
        System.out.println("set size:"+ set.size());
    }

}